@extends('layouts.app')
@include('authority.sidebar')
@section('content')
    <div class="content">
        <div class="row custom-invoice">

            @can('authority-add')
                <a class="btn btn-success"  href="{{ route('admin.authority.role.create') }}">添加角色</a>
            @endcan
            <br />
            <br />
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th>权限组名</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                @foreach($data as $item)
                    <tr>
                        <td>{{ $item->title }}</td>
                        <td>
                            @can('authority-edit')
                                <a class="btn btn-primary btn-xs" href="{{ route('admin.authority.role.edit', ['id' => $item->id]) }}"><i class="fa fa-edit"></i> 编辑</a>
                            @endcan
                            @can('authority-ability')
                                <a class="btn btn-success btn-xs" href="{{ route('admin.authority.ability', ['role' => $item->name]) }}"><i class="fa fa-code-fork"></i> 权限管理</a>
                            @endcan
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
@endsection
@push('scripts')
@endpush
